/*
 * DAOSTests
 */
package fr.cinescope2014.daos;

import fr.cinescope2014.modeles.BoxOffice;
import fr.cinescope2014.modeles.SalleParis;
import java.sql.Connection;
import java.util.List;

/**
 *
 * @author pascal
 */
public class DAOSTests {

    public static void main(String[] args) {
        Connection lcn = Connexion.getConnexionMySQL("127.0.0.1", "cinescope2014", "3306", "root", "");

        BoxOfficeDAO boDAO = new BoxOfficeDAO(lcn);
        List<BoxOffice> listeBO = boDAO.selectAll();
        for (BoxOffice bo : listeBO) {
            System.out.println(bo.getTitreFilm() + "-" + bo.getTotalEntrees());
        }

        System.out.println("*************************");
        SalleParisDAO spDAO = new SalleParisDAO(lcn);
        List<SalleParis> listeSP = spDAO.selectAll();
        for (SalleParis sp : listeSP) {
            System.out.println(sp.getNomArrondissement() + "-" + sp.getNomCinema() + "-" + sp.getTitreFilm());
        }
    }
}
